use axum::{response::IntoResponse, routing::get, Json, Router};
use serde::Serialize;

pub fn router() -> Router {
    Router::new().route("/", get(index))
}

async fn index() -> impl IntoResponse {
    #[derive(Debug, Serialize)]
    struct IndexResponse {
        author: &'static str,
        company: &'static str,
    }

    Json(IndexResponse {
        author: "李扬、卞璐璐",
        company: "苏州幻果软件有限公司",
    })
}
